]> dgit.raspbian.org Git - gnome-shell.git/commit
st/private: Set sampling_radius to match the blur radius
authorDaniel van Vugt <daniel.van.vugt@canonical.com>
Thu, 24 Jun 2021 10:19:09 +0000 (18:19 +0800)
committerMarge Bot <marge-bot@gnome.org>
Tue, 29 Jun 2021 22:32:24 +0000 (22:32 +0000)
commit48d5740443598193b67bfec48d0bb1a32e003572
tree9b14cbc3ff4c64d6d8b03e5eb99d4d249e684a45
parentc08c142f95556321bd96f5808a32571cacf7f715
st/private: Set sampling_radius to match the blur radius

From [the spec](https://www.w3.org/TR/css-backgrounds-3/#shadow-blur):

> the resulting shadow must approximate (with each pixel being within 5%
> of its expected value) the image that would be generated by applying to
> the shadow a Gaussian blur with a standard deviation [sigma] equal to
> half the blur radius

This does not change the value of `sigma`, it only corrects the value of
`sampling_radius` used to size the shadow texture. Since the texture is
no longer being slightly oversized it won't get scaled down when rendered
according to the dimensions provided by `st_shadow_get_box` in
`_st_paint_shadow_with_opacity`.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4409
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1897>
src/st/st-private.c